package org.example.service;


import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "provider-server")  //name 指向服务提供者再nacos注册的服务名也就是spring.application.name
public interface UserService {



    @GetMapping(value = "/getTest")   //openFeign 增强了feign与spring mvc 完美结合，可以使用mvc的常用注解使用
    String getTest();

    @GetMapping(value = "/provider/user/getById/{id}")
    String getUser(@PathVariable("id") Integer id);


}
